package com.you.atlas.biz.place.service.impl;

import java.util.List;

import com.you.atlas.biz.place.service.NotePhotoService;
import com.you.place.dal.dao.NotePhotoDAO;
import com.you.place.dal.dao.dataobject.NotePhotoDO;

public class NotePhotoServiceImpl implements NotePhotoService {

    private NotePhotoDAO notePhotoDAO;

    public void setNotePhotoDAO(NotePhotoDAO notePhotoDAO) {
        this.notePhotoDAO = notePhotoDAO;
    }

    @Override
    public List<NotePhotoDO> queryNotePhotoList(Long noteItemId) {
        return notePhotoDAO.queryByNoteItemId(noteItemId);
    }

    @Override
    public boolean createNotePhoto(NotePhotoDO notePhotoDO) {
        return notePhotoDAO.create(notePhotoDO) != null;
    }

    @Override
    public List<NotePhotoDO> queryNotePhotoListByMemberId(Long memberId) {
        return notePhotoDAO.queryByMemberId(memberId);
    }

    @Override
    public boolean delete(Long id) {
        return notePhotoDAO.delete(id)!=null;
    }

}
